package com.hdu.dwh.service;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.service.annotation.HttpExchange;
import org.springframework.web.service.annotation.PostExchange;

import com.hdu.dwh.pojos.LoginSupersetUser;
import com.hdu.dwh.pojos.SupersetUser;

import jakarta.ws.rs.FormParam;

@Service
@HttpExchange(url = "/")
public interface SupersetRestService {
    /**
     * 注册superset用户
     * @param user {@link SupersetUser}
     * @return
     */
    @PostExchange(url = "users/add")
    ResponseEntity<String> createSupersetUser(
        @RequestBody MultiValueMap<String, String> form
    );
        
    @PostExchange(url = "login/?next=/")
    ResponseEntity<String> loginSuperset(@RequestBody MultiValueMap<String, String> form);

}
